// 计划管理模块API
import { getAction, deleteAction, putAction, putparamsAction, postAction, httpAction } from '@/api/manage'

// 生产订单
const productionToDisPatchList = (params) => getAction('/jksaas-produce/produce/productionorder/productionOrder/toDisPatch/list', params)
const productionOrderAdd = (params) => postAction('/jksaas-produce/produce/productionorder/productionOrder/add', params)

// 车间计划
export const workshopPlanPage = (params) => getAction('/jksaas-produce/produce/workShopPlan/pendingList', params)
export const workshopPlanDetail = (params) => getAction('/jksaas-produce/produce/workShopPlan/queryById', params)
export const getWorkshopPlanCode = (params) => getAction('/jksaas-produce/produce/workShopPlan/getScheduleCode', params) //计划排产code
export const getWorkshopPlanDefaultNum = (params) => getAction('/jksaas-produce/produce/workShopPlan/queryPlanNumById', params) //获取计划生产数量默认数据
export const workshopPlanAdd = (params) => postAction('/jksaas-produce/produce/workShopPlan/manualScheduling', params)

export const scheduledPage = (params) => getAction('/jksaas-produce/produce/workShopPlan/scheduledList', params)
export const dispatchWorkOrders = (params) => postAction('/jksaas-produce/produce/workShopPlan/dispatchWorkOrders', params) // 派发
export const getScheduleInfo = (params) => getAction('/jksaas-produce/produce/workShopPlan/getScheduleInfo', params)
export const workshopPlanEdit = (params) => postAction('/jksaas-produce/produce/workShopPlan/editSchedule', params)
export const getGanttPage = (params) => getAction('/jksaas-produce/produce/workShopPlan/queryGanttPageList', params) // 已排甘特图

// v3.1新增接口
// 1.生成炉批号
export const createStoveCode = (params) => getAction('/jksaas-produce/produce/productionorder/productionOrder/createCode', params) //生成炉批号
export const distributionBatch = (params) => postAction('/jksaas-produce/produce/productionorder/productionOrder/distributionBatch', params) //批量派发车间
export const productionOrderVerify = (params) => getAction('/jksaas-produce/produce/productionorder/productionOrder/verify', params) //校验是否可批量派发

// 产线信息的接口
export const productionLineList = (params) => getAction('/jksaas-produce/produce/baseSetting/productionLine/list', params) //产线列表
export const productionLineAdd = (params) => postAction('/jksaas-produce/produce/baseSetting/productionLine/add', params)  //产线新增
export const productionLineEdit = (params) => putAction('/jksaas-produce/produce/baseSetting/productionLine/edit', params) //产线编辑
export const productionLineDelete = (params) => deleteAction('/jksaas-produce/produce/baseSetting/productionLine/delete', params) //产线删除
export const productionLineQueryById = (params) => getAction('/jksaas-produce/produce/baseSetting/productionLine/queryById', params) //产线详情
export const productionLineVerifyByLineName = (params) => getAction('/jksaas-produce/produce/baseSetting/productionLine/verifyByLineName', params) //校验产线名称重复
export const verifyByLineCode = (params) => getAction('/jksaas-produce/produce/baseSetting/productionLine/verifyByLineCode', params) //校验产线编号重复












